FROM centos:8
RUN yum -y update && yum -y install gcc python3-devel && yum -y install python3 && yum -y install net-tools && yum -y install dos2unix crontabs
LABEL maintainer="Qin Ke<collinsctk@qytang.com>"

WORKDIR /DevNet2019/

COPY requirement.txt .
RUN pip3 install -i https://pypi.douban.com/simple/ -r requirement.txt

ENV RUN_PORT=8001

EXPOSE $RUN_PORT

ADD DevNet2019 /DevNet2019

COPY init-db.sh .
COPY uwsgi.ini .
#RUN python3 manage.py crontab add && crond restart
CMD uwsgi --ini uwsgi.ini
#CMD dos2unix init-db.sh && chmod +x init-db.sh && ./init-db.sh
#CMD sh -c 'while true; do ((count++));echo "now count=$count";sleep 1;done'